 import {personPrepareLessonPage} from '@/api/personPrepareLesson'
const state = {
 prepareLesson:{},//教研设计/备课 查询
 TEACHER:{records:[]},
 TRAINER:{records:[]},
 State:{},
}
const mutations = {
  prepareLesson:(state,data)=>{
    state.prepareLesson =  data
  },
  State:(state,data)=>{
   state.State = data
  }
}
const actions = {
  async Page({commit,state},params){
      let param = params
     params =  params.params?params.params:params
     params = params
     //this.$store.dispatch('uploadLessonPlanss/Page',params)
    let  {data} = await personPrepareLessonPage(params)
    //if(!data.total) data = require('@/api/loc/personPrepareLesson').Page.data
    if(param.stateName){
      state[param.stateName] =  data
      commit('State',data)
    }else{
       state.prepareLesson =  data
    }

   // 
    commit('prepareLesson',data)
   }

}

export default {
  state,
  mutations,
  actions,
  namespaced: true
}
